Don't set the sort column when there is no model
authorFederico Mena Quintero <federico@novell.com>
Thu, 18 Jun 2009 01:33:57 +0000 (20:33 -0500)
committerFederico Mena Quintero <federico@novell.com>
Thu, 18 Jun 2009 01:33:57 +0000 (20:33 -0500)
We can't set the sort column when we load the GtkFileChooser's settings, as the
file models may not have been created yet.  Wait until the models are actually
present; then we can set the sort column.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
gtk/gtkfilechooserdefault.c

index 7dc98676e4833398b7bb49dbbfc87f15c7bce716..2e5233cf8b2021746d7bf7787185646c49330001 100644 (file)
@@ -6114,7 +6114,10 @@ settings_load (GtkFileChooserDefault *impl)
 
   impl->sort_column = sort_column;
   impl->sort_order = sort_order;
-  set_sort_column (impl);
+  /* We don't call set_sort_column() here as the models may not have been
+   * created yet.  The individual functions that create and set the models will
+   * call set_sort_column() themselves.
+   */
 }
 
 static void